<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
            <title>Global Image - Detalhe &Aacute;rea de Atua&ccedil;&atilde;o</title>
            <link rel="stylesheet" type="text/css" href="/globalimage2/faces/jsfcrud.css" /><%@ include file="/WEB-INF/jspf/AjaxScripts.jspf" %><script type="text/javascript" src="/globalimage2/faces/jsfcrud.js"></script>
        </head>
        <body>
            <%@include file="../../WEB-INF/jspf/header/head.jspf"%>
            <div style="float:left">
                <%@include file="../../WEB-INF/jspf/header/menuDinamico.jspf"%>
            </div>
            <div id="div_content">
                

                <h3>Detalhe da &aacute;rea de atua&ccedil;&atilde;o</h3>
                <h:form>
                    <h:commandLink action="#{areaAtuacao.createSetup}" value="Novo" />
                    &nbsp;|&nbsp;

                    <h:commandLink action="#{areaAtuacao.listSetup}" value="Exibir todos"/>


                    <h:panelGroup id="messagePanel" layout="block">
                        <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
                    </h:panelGroup>


                    <h:panelGrid columns="2">
                        <h:outputText value="Nome:"/>
                        <h:outputText value="#{areaAtuacao.areaAtuacao.nome}" title="Nome" />
                        <h:outputText value="Empresas relacionadas: " />
                        <h:panelGroup>
                            <h:outputText rendered="#{empty areaAtuacao.areaAtuacao.empresaCollection}" value="(No Items)"/>
                            <h:dataTable value="#{areaAtuacao.areaAtuacao.empresaCollection}" var="item"
                                         border="0" cellpadding="2" cellspacing="0" rowClasses="jsfcrud_odd_row,jsfcrud_even_row" rules="all" style="border:solid 1px"
                                         rendered="#{not empty areaAtuacao.areaAtuacao.empresaCollection}">
                                <h:column>
                                    <f:facet name="header">
                                        <h:outputText value="Nome"/>
                                    </f:facet>
                                    <h:commandLink value=" #{item.nome}" action="#{empresa.detailSetup}">
                                        <f:param name="jsfcrud.currentAreaAtuacao" value="#{jsfcrud_class['entidade.controller.JSF.util.JsfUtil'].jsfcrud_method['getAsConvertedString'][areaAtuacao.areaAtuacao][areaAtuacao.converter].jsfcrud_invoke}"/>
                                        <f:param name="jsfcrud.currentEmpresa" value="#{jsfcrud_class['entidade.controller.JSF.util.JsfUtil'].jsfcrud_method['getAsConvertedString'][item][empresa.converter].jsfcrud_invoke}"/>
                                        <f:param name="jsfcrud.relatedController" value="areaAtuacao" />
                                        <f:param name="jsfcrud.relatedControllerType" value="entidade.controller.JSF.AreaAtuacaoController" />
                                        
                                    </h:commandLink>
                                </h:column>
                                <h:column>
                                    <f:facet name="header">
                                        <h:outputText value="Matriz"/>
                                    </f:facet>
                                    <h:outputText value=" #{item.matrizId != null ? item.matrizId : 'Matriz'}"/>
                                </h:column>
                            </h:dataTable>
                        </h:panelGroup>
                    </h:panelGrid>
                    <br />

                </h:form>
            </div>
        </body>
    </html>
</f:view>
